package upm.pb4agent.team3;

import jade.content.lang.Codec;
import jade.content.lang.sl.SLCodec;
import jade.content.onto.Ontology;
import jade.core.Agent;
import jade.core.behaviours.CyclicBehaviour;
import jade.core.behaviours.OneShotBehaviour;
import jade.domain.DFService;
import jade.domain.FIPAException;
import jade.domain.FIPAAgentManagement.DFAgentDescription;
import jade.domain.FIPAAgentManagement.ServiceDescription;
import jade.lang.acl.ACLMessage;
import jade.lang.acl.MessageTemplate;
import upm.pb4agent.ontology.PB4AgentOntology;


/**
 * This agent has the following functionality: 
 * <ul>
 * <li> 
 * <li> 
 * </ul>
 * @author Team3, UPM
 */
public class Referee extends Agent {
	private static final long serialVersionUID = 8821716582556055251L;
	
	private Codec codec = new SLCodec();//Codec for the SL language used and instance of the ontology
    private Ontology ontology = PB4AgentOntology.getInstance();//PB4AgentOntology that has been created for all teams
	
	protected void setup() {
		System.out.println(getLocalName() + ": enters the system");
		
		MyAgent.registerAgentInDF(this,Constant.SD_REFEREE);
		
		getContentManager().registerLanguage(codec);
		getContentManager().registerOntology(ontology);
		
		addBehaviour(new SubscriptionResponderReferee(this));
	}
}